﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<AgriculturalMachinery.Models.NotifyViewModel<AgriculturalMachinery.Models.Notify>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	铁牛农机后台管理系统: 通知管理
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<div class="operaAera">
    <div id="operaInfo" class="operaInfo" onclick="operaInfoClick();" onmousemove="operaInfoMouseMove();" onmouseout="operaInfoMouseOut();"></div>
    <div id="operaUsers" class="operaUsers" onclick="operaUsersClick();" onmousemove="operaUsersMouseMove();" onmouseout="operaUsersMouseOut();"></div>        
    <div id="operaStorage" class="operaStorage" onclick="operaStorageClick();" onmousemove="operaStorageMouseMove();" onmouseout="operaStorageMouseOut();"></div>
    <div id="operaQuit" class="operaAeraQuit" onclick="operaAeraQuit();"></div>
</div>
<div class="operaContent">
    <div class="operaContentDelChk" onclick="operaContentDelChk(<%=Model.NotifyPageIndex%>);">删除选中</div><hr />
    <table class="operaContentTable">
        <tr class="operaContentTableTitle">
            <td><input type="checkbox" onclick="notifySelectAll();"/></td>
            <td>通知发布者</td>
            <td>标题</td>
            <td>内容</td>
            <td>发布日期</td>
            <td>点击删除</td>
        </tr>
    <%int i = 1; %>
    <%foreach (AgriculturalMachinery.Models.Notify n in Model.QueryNotify) %>
    <%{ %>
        <%if (n.IsValid == 0) %>
        <%{ %>
        <tr>
            <td><input type="checkbox" class="ck" name="ck" id="<%=n.NotifyID %>"/><%=i++ %><%=n.NotifyID %></td>
            <td><%=n.Announcer%></td>
            <td><%=n.NotifyTitle.ToString().Substring(0,5)+"..."%></td>
            <td><%=n.NotifyContent.ToString().Substring(0,15) + "..."%></td>
            <td><%=n.PublicationDate.ToString(("yyyy-MM-dd"))%></td>
            <td><a href="/notify/Delete/<%=n.NotifyID %>">点击删除</a></td>
        </tr>
        <%} %>
    <%} %>
        <tr>
            <td></td>
            <td><input type="text" style="width: 77px;" id="announcer" value="admin"/></td>
            <td><input type="text" style="width: 77px;" id="notifyTitle"/></td>
            <td><input type="text" style="width: 77px;" id="notifyContent"/></td>
            <td><input type="text" style="width: 77px;" id="NotifyDate"/></td>
            <td><div onclick="addNotify(announcer.value, notifyTitle.value, notifyContent.value, NotifyDate.value,<%=Model.NotifyPageIndex %>);">&nbsp;&nbsp;&nbsp;&nbsp;添加</div></td>
        </tr>
    </table>
    <%if (Model.NotifyHasPreviousPage) %>
    <%{ %>
        <%-- =Html.RouteLink("", "notify", new { page = (Model.NotifyPageIndex - 1)}) --%>
    <div id="fenyeLeft" class="fenyeLeft" onmousemove="fenyeLeftMouseMove();" onmouseout="fenyeLeftMouseOut();"
                onclick="notifyFenyeLeft(<%=Model.NotifyPageIndex - 1 %>);"></div>
    
    <%} %>
    <%if (Model.NotifyHasNextPage) %>
    <%{ %>
        <%-- =Html.RouteLink(">>>", "notify", new { page = (Model.NotifyPageIndex + 1) }) --%>
    <div id="fenyeRight" class="fenyeRight" onmousemove="fengyeRightMouseMove();" onmouseout="fenyeRightMouseOut();"
                onclick="notifyFenyeRight(<%=Model.NotifyPageIndex + 1 %>);">
    </div>
    <%} %>
</div>
<script type="text/javascript" src="../../Scripts/NotifyManager.js"></script>
</asp:Content>
